<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			Array.prototype.sum = function() {
				var sum = 0;
				console.log(this)
				for(i=0; i<this.length; i++) {
					sum += this[i];
				}
				return sum;
			}
			var arr = [1,2,3,4];
			console.log(arr.sum());
		</script>
	</head>
	<body>
	</body>
</html>
